#include <iostream>

using namespace std;

int numbers[5] = {3 ,5 ,-10 ,0 ,14}, n = 5;

int main()
{
	int abso = 0, maxabs = 0, i, nr = 0, j;
	
	for (i = 0; i < n; ++i)
	{
		nr = 0;
		if (numbers[i] < numbers[i + 1])
			for (j = numbers[i]; j <= numbers[i + 1]; ++j, ++nr)
				abso = nr;
		
		nr = 0;
		if (numbers[i] > numbers[i + 1])
			for (j = numbers[i + 1]; j <= numbers[i]; ++j, ++nr)
				abso = nr;
		
		if (numbers[i] == numbers[i + 1])
			abso = 0;
	
		if (abso > maxabs)
			maxabs = abso;
	
	}
	
	cout << maxabs;
	return 0;
}

